Skip to content

Conversation

Pi-Cla
Copy link

@Pi-Cla Pi-Cla commented Mar 21, 2024

I feel like there is probably a more elegant solution... so if anyone has suggestions, throw em in here

@Pi-Cla

This comment was marked as resolved.


for (n, v) in headers.iter() {
lower_headers.append(
HeaderName::from_lowercase(n.as_str().to_ascii_lowercase().as_bytes()).unwrap(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All HeaderNames store themselves as lowercase. You don't need to convert them here. The from_lowercase only makes sure the bytes were lowercase originally, vs from_bytes will allow uppercase but convert it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants